package com.rui.patterns.factory.simpleFactory;

/**
 * @author : [锐神NO.3]
 * @version : [v1.0]
 * @className : CoffeeStore
 * @createTime : [2022/2/19 21:38]
 * @description : [描述该类的功能]
 */

public class CoffeeStore {

    public Coffee orderCoffee(String type){

        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();

        //生产咖啡的方法
        Coffee coffee = factory.createCoffee(type);

        //加配料
        coffee.addMilk();
        coffee.addSugar();

        return coffee;
    }
}
